import 'dart:io';
import 'package:flutter/material.dart';

class MyAvatarWidget extends StatelessWidget {
  final String imgPath;

  const MyAvatarWidget({Key key, @required this.imgPath}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 80.0,
      height: 80.0,
      decoration: BoxDecoration(
          image: DecorationImage(
              image: imgPath == "assets/image/avatar.jpeg"
                  ? AssetImage(imgPath)
                  : FileImage(File(imgPath))),
          border: Border.all(color: Colors.white, width: 4.0),
          borderRadius: BorderRadius.circular(40.0)),
    );
  }
}
